import { createApp } from 'vue';
import '@/styles/index.scss';
import App from './App.vue';
import setupPlugin from '@/plugins';
import router, { setupRouter } from '@/plugins/router';
import AppProvider from '@/components/application';
async function init() {
  const appProvider = createApp(AppProvider); // 挂载全局钩子
  appProvider.mount('#appProvider', true);
  const app = createApp(App);
  app.use(setupPlugin); // 挂载插件

  // 挂载路由
  await setupRouter(app);
  await router.isReady();
  app.mount('#app');
}
void init();
